Skip to content

Support FEP-ef61 portable ActivityPub IRIs in vocab codecs#850

Open
dahlia wants to merge 55 commits into
fedify-dev:mainfrom
dahlia:feat/fep-ef61/ap-iris
Open

Support FEP-ef61 portable ActivityPub IRIs in vocab codecs#850
dahlia wants to merge 55 commits into
fedify-dev:mainfrom
dahlia:feat/fep-ef61/ap-iris

Conversation

@dahlia

@dahlia dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member

Fixes #826.

Why this is shaped this way

Fedify vocabulary objects already use URL as the internal representation for IRI-like fields. This PR keeps that contract instead of introducing a parallel portable IRI type. The awkward part of FEP-ef61 is that the readable form uses a decoded DID authority, such as ap+ef61://did:key:.../actor, while the platform URL parser needs that authority to be URL-safe. The new runtime helpers in packages/vocab-runtime/src/url.ts make that boundary explicit: parse portable ActivityPub IRIs into normal URL objects with encoded authorities, then format those URL objects back to canonical ap+ef61: strings when JSON-LD is emitted.

That keeps the generated vocabulary classes from having to know the details of portable IRI parsing. packages/vocab-tools/src/codec.ts and packages/vocab-tools/src/type.ts now call the shared helpers wherever generated code previously reached for new URL(), URL.canParse(), or .href on an IRI field. This also preserves the existing at:// workaround in one place instead of duplicating it in the generated code.

The JSON-LD cache path needed a small extra guard. When an object is built from JSON-LD that already contains portable IRIs, returning the raw cached document would skip the formatter and leak the input spelling back out. Generated codecs now only reuse the raw JSON-LD cache when the input does not contain ap: or ap+ef61: portable IRI syntax.

Scope

This PR handles parsing and formatting for generated vocab codecs. It accepts ap: and ap+ef61: values with decoded or percent-encoded DID authorities, stores them internally as URL-safe URL objects, and emits canonical ap+ef61: values with decoded DID authorities.

It intentionally does not add comparison canonicalization that ignores query components. That belongs to the follow-up comparison work tracked separately in #828.

Verification

I covered the behavior at both levels: focused tests for the runtime helpers in packages/vocab-runtime/src/url.test.ts, and generated vocab behavior in packages/vocab/src/vocab.test.ts. The vocab test exercises object IDs, link-like properties, collection page links, decoded DID authorities, percent-encoded DID authorities, uppercase schemes, query strings, and JSON-LD round-tripping through toJsonLd().

I also regenerated the vocab-tools snapshots and updated the manual and changelog.

Commands run:

mise run test:update_snapshots
deno test packages/vocab-runtime/src/url.test.ts
deno test -A packages/vocab/src/vocab.test.ts --filter 'portable ActivityPub IRIs'
mise check && mise test

@dahlia dahlia added this to the Fedify 2.4 milestone Jun 29, 2026
@dahlia dahlia self-assigned this Jun 29, 2026
@dahlia dahlia added component/vocab Activity Vocabulary related activitypub/compliance Specification compliance component/vocab-tools Vocabulary code generation (@fedify/vocab-tools) labels Jun 29, 2026
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema canceled.

Name Link
🔨 Latest commit fb47477
🔍 Latest deploy log https://app.netlify.com/projects/fedify-json-schema/deploys/6a469d1f8afa7700080017e4

@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds portable ap:/ap+ef61: IRI support in vocab-runtime, updates generated vocab codecs and scalars to use the new helpers, and adds regression tests, documentation, and release-note updates.

Changes

FEP-ef61 Portable ActivityPub IRI Support

Layer / File(s) Summary
parseIri / formatIri / canParseIri implementation
packages/vocab-runtime/src/url.ts, packages/vocab-runtime/src/mod.ts
Adds portable IRI parsing and formatting helpers, internal authority normalization helpers, and runtime re-exports.
Unit tests for parseIri / formatIri / canParseIri
packages/vocab-runtime/src/url.test.ts
Adds tests for portable ap: and ap+ef61: parsing, canonical formatting, non-DID rejection, and round-trip preservation.
Portable IRI detection in generators
packages/vocab-tools/src/class.ts
Updates generator wiring to collect portable-IRI keys and emit portable IRI detection logic.
Codec and scalar updates
packages/vocab-tools/src/codec.ts, packages/vocab-tools/src/type.ts
Replaces direct URL handling with portable IRI helpers in JSON-LD codec and scalar generation, and skips cached JSON-LD cloning for portable-IRI payloads.
Integration tests and release docs
packages/vocab/src/vocab.test.ts, docs/manual/vocab.md, CHANGES.md, SPONSORS.md
Adds portable-IRI round-trip tests, documents the JSON-LD behavior, adds the changelog entry, and adjusts sponsor whitespace.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Suggested labels

type/enhancement

Suggested reviewers

  • 2chanhaeng
  • sij411
🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements portable IRI parsing and formatting, but it omits the requested comparison canonicalization helper that ignores query components. Add the query-insensitive comparison canonicalization helper in @fedify/vocab-runtime and wire it into the portable IRI comparison path.
Out of Scope Changes check ⚠️ Warning SPONSORS.md was changed only with whitespace adjustments, which is unrelated to the portable IRI codec work. Remove the unrelated SPONSORS.md whitespace-only edits unless they were intentionally included for another approved change.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding FEP-ef61 portable ActivityPub IRI support in vocab codecs.
Description check ✅ Passed The description is directly about the portable IRI codec changes and their supporting tests, docs, and changelog updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs (using ap: and ap+ef61: schemes) within the generated vocabulary codecs. It adds new utility functions (canParseIri, parseIri, and formatIri) to handle parsing and canonical serialization of these IRIs, updates the vocabulary generation tools to integrate these utilities, and includes comprehensive tests. The review feedback suggests refining the PORTABLE_IRI_PATTERN regular expression in the class generator to prefix it with a double quote, ensuring it only matches the start of JSON string values and avoiding false positives in text properties.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-tools/src/class.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c67df65fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-tools/src/codec.ts Outdated
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.25038% with 83 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ackages/vocab-runtime/src/internal/jsonld-cache.ts 83.40% 41 Missing and 34 partials ⚠️
packages/vocab-runtime/src/url.ts 92.59% 3 Missing and 5 partials ⚠️
Files with missing lines Coverage Δ
packages/vocab-runtime/src/mod.ts 100.00% <100.00%> (ø)
packages/vocab-tools/src/class.ts 98.94% <100.00%> (+0.36%) ⬆️
packages/vocab-tools/src/codec.ts 97.65% <100.00%> (ø)
packages/vocab-tools/src/property.ts 95.85% <100.00%> (ø)
packages/vocab-tools/src/type.ts 84.40% <100.00%> (-0.21%) ⬇️
packages/vocab/src/lookup.ts 96.46% <100.00%> (+0.06%) ⬆️
packages/vocab-runtime/src/url.ts 90.28% <92.59%> (+1.18%) ⬆️
...ackages/vocab-runtime/src/internal/jsonld-cache.ts 83.40% <83.40%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dahlia added a commit to dahlia/fedify-fork that referenced this pull request Jun 29, 2026
Generated codecs now look for portable ActivityPub IRIs only in
ID-valued JSON-LD positions before deciding whether to bypass the raw
JSON-LD cache. This keeps ordinary text such as post content from
causing cache misses and dropping extension properties on default
serialization.

fedify-dev#850 (comment)
fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for FEP-ef61 portable ActivityPub IRIs in generated vocabulary codecs, allowing "ap:" and "ap+ef61:" schemes to be parsed, serialized, and validated. Feedback on the changes highlights a potential Denial of Service (DoS) vulnerability in the generated "hasPortableIri" recursive function, which traverses JSON-LD objects without a depth limit or skipping the "@context" property. It is recommended to implement a recursion depth limit and skip "@context" to prevent stack overflow errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-tools/src/class.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f9581bd2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-runtime/src/url.ts
Comment thread packages/vocab-tools/src/codec.ts Outdated
dahlia added a commit to dahlia/fedify-fork that referenced this pull request Jun 29, 2026
Portable IRI formatting now preserves pct-encoded DID authority
boundaries, and generated cache detection now inspects expanded JSON-LD
with bounded traversal. That keeps alias-expanded portable IRIs from
being cached in their raw form while avoiding unnecessary context walks.

fedify-dev#850 (comment)
fedify-dev#850 (comment)
fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs in the generated vocabulary codecs. It adds utility functions (canParseIri, parseIri, and formatIri) to handle ap: and ap+ef61: schemes with DID authorities, ensuring they are correctly parsed into URL objects and serialized back to canonical ap+ef61: formats. The code generator and runtime codecs have been updated to integrate these utilities, and comprehensive tests have been added. The feedback suggests minor code simplifications: optimizing parseAtUri to avoid redundant string searches and using optional chaining in canContainIriValue to improve readability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-runtime/src/url.ts
Comment thread packages/vocab-tools/src/class.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/vocab-runtime/src/url.ts`:
- Around line 67-71: Route URL inputs through the same portable-authority
normalization used by parsePortableIri(). In normalizePortableUrl(), do not
reconstruct the URL directly from iri.host/pathname; instead apply the same
did:-only authority validation and encodeURIComponent re-encoding logic so URL
and string inputs behave identically. Preserve the existing ap:/ap+ef61:
protocol acceptance in normalizePortableUrl(), but ensure the returned URL uses
the same internal portable-authority form as the parser.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f66ccc6c-1f52-48ea-ac0a-c389348f1a57

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9581b and 8108116.

⛔ Files ignored due to path filters (3)
  • packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap is excluded by !**/*.snap
  • packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap is excluded by !**/*.snap
  • packages/vocab-tools/src/__snapshots__/class.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • packages/vocab-runtime/src/url.test.ts
  • packages/vocab-runtime/src/url.ts
  • packages/vocab-tools/src/class.ts
  • packages/vocab-tools/src/codec.ts
  • packages/vocab/src/vocab.test.ts

Comment thread packages/vocab-runtime/src/url.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8108116bdd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-runtime/src/url.ts Outdated
Comment thread packages/vocab-tools/src/codec.ts Outdated
dahlia added a commit to dahlia/fedify-fork that referenced this pull request Jun 29, 2026
Portable URL instances now use the same authority validation and
encoding path as string inputs, so DID boundaries and DID-internal
percent escapes round-trip consistently. Generated cache detection also
treats fedify:url scalar values as IRI-bearing fields without disabling
caching for plain text fields.

fedify-dev#850 (comment)
fedify-dev#850 (comment)
fedify-dev#850 (comment)
fedify-dev#850 (comment)
fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs in the generated vocabulary codecs, allowing both ap: and ap+ef61: schemes to be parsed as URL objects and serialized canonically. To support this, new utility functions canParseIri, parseIri, and formatIri were added to the runtime and integrated into the vocabulary generation tools. Feedback on the changes highlights a potential TypeError in formatIri when processing relative URI strings, as it attempts to instantiate a URL without a base URL; a fallback check is recommended to improve robustness.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-runtime/src/url.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b6047f952

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-runtime/src/url.ts
dahlia added a commit to dahlia/fedify-fork that referenced this pull request Jun 29, 2026
Pathless portable ActivityPub IRIs are now rejected before URL
normalization, matching FEP-ef61's required path component. Non-portable
relative strings passed to formatIri now remain unchanged instead of
raising from the fallback URL formatter.

fedify-dev#850 (comment)
fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs across the vocabulary codecs, documentation, and runtime. It adds utilities for parsing, formatting, and comparing portable IRIs, and implements a JSON-LD cache normalization and compaction mechanism in jsonld-cache.ts. The vocabulary generator is updated to utilize these new features. Feedback on the pull request suggests optimizing mergeUnmappedTerms in jsonld-cache.ts by avoiding cloning the compacted object tree when there are no unmapped keys to merge, which helps preserve object identity and minimize cloning costs.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-runtime/src/internal/jsonld-cache.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02426e5720

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-runtime/src/internal/jsonld-cache.ts Outdated
Comment thread packages/vocab-tools/src/codec.ts

@2chanhaeng 2chanhaeng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! The very last thing: remove canParseIri from packages/vocab-runtime/src/mod.ts, packages/vocab-runtime/src/url.test.ts, and packages/vocab-runtime/src/url.ts.

Comment thread packages/vocab-runtime/src/url.ts Outdated
Remove the unused canParseIri runtime export, keep no-context cache
compaction from borrowing nested child contexts, and fetch portable IRI
references through their canonical external spelling.

fedify-dev#850 (review)
fedify-dev#850 (comment)
fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Addressed 2chanhaeng’s final review request in 96937a5: canParseIri has been removed from the runtime export, implementation, and tests.

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

Return the compacted JSON-LD object directly when there are no unmapped
terms to merge, preserving object identity for unchanged cache subtrees.

fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive support for FEP-ef61 portable ActivityPub IRIs (using ap: and ap+ef61: schemes with DID authorities) across the vocabulary codecs, runtime, and tools. It adds utility functions for parsing, formatting, and comparing portable IRIs, integrates JSON-LD cache normalization and compaction, and updates code generation tools to handle these IRIs correctly. One critical issue was identified in the JSON-LD context combination logic, where combining array contexts could result in invalid nested arrays; a flattening approach is suggested to resolve this.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab-runtime/src/internal/jsonld-cache.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: a8eea748c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Nested objects can provide their own context as an array.  When that
context is merged with an inherited context, keep the resulting JSON-LD
context flat so processors do not see an invalid nested array.

fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e22d8dd060

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-tools/src/property.ts
Generated getters should still respect crossOrigin: "trust" when the
owning object has no id.  Without that, id-less parsed objects replaced
embedded property objects with their ids and fetched unnecessarily.

fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs (using ap: and ap+ef61: schemes) across the vocabulary codecs and runtime. It adds new utility functions for parsing, formatting, and comparing portable IRIs, and implements a JSON-LD cache normalization and compaction mechanism (compactJsonLdCache) to preserve portable IRIs and unmapped terms in cached JSON-LD data. Additionally, code generation tools and property lookup mechanisms have been updated to utilize these new utilities and enforce proper cross-origin trust boundaries. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b291ae9ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vocab-runtime/src/internal/jsonld-cache.ts Outdated
Explicit null contexts reset inherited terms, so cache recompaction should not apply parent aliases to those nested objects.

fedify-dev#850 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@dahlia

dahlia commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for FEP-ef61 portable ActivityPub IRIs in the generated vocabulary codecs. It allows both ap: and ap+ef61: schemes to be parsed as URL objects, handling both decoded and percent-encoded DID authorities, and serializes them back to canonical ap+ef61: values. To support this, a new internal module jsonld-cache.ts was added to handle JSON-LD cache normalization and compaction, and several helper functions (parseIri, formatIri, haveSameIriOrigin, and parseJsonLdId) were introduced in the URL utility module. The code generation tools and vocabulary lookup logic have been updated to utilize these new utilities, accompanied by comprehensive test coverage. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: fb47477938

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

activitypub/compliance Specification compliance component/vocab Activity Vocabulary related component/vocab-tools Vocabulary code generation (@fedify/vocab-tools)

Development

Successfully merging this pull request may close these issues.

Support ap: and ap+ef61: URI schemes in vocabulary codecs

3 participants